function KKB.Panel_Entitys( Panel )
	Panel_Entitys = Panel
	Panel_Entitys:SetSize(100, 400)
	Panel_Entitys:Clear(true)
	Panel_Entitys.contents = vgui.Create("DListLayout")
	Panel_Entitys.contents:Clear()
	
	KKB.Entitys_GroupList = vgui.Create( "DListView" )
	KKB.Entitys_GroupList:AddColumn( "User Group" )
	KKB.Entitys_GroupList:SetTall( 150 )
	KKB.Entitys_GroupList:SetMultiSelect( true )
	function KKB.Entitys_Reload_GroupList()
		KKB.Entitys_GroupList:Clear()
		for k,_ in pairs(KKB.UserGroups) do
			KKB.Entitys_GroupList:AddLine(k)
		end
	end
	KKB.Entitys_Reload_GroupList()
	Panel_Entitys:AddPanel(KKB.Entitys_GroupList)
	
	local AddGroupButton = vgui.Create( "DButton" )
	AddGroupButton:SetText( "Add Group(s) To Selected Entity" )
	AddGroupButton.DoClick = function( button )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local SelectedLines = KKB.Entitys_GroupList:GetSelected()
			if ( #SelectedLines > 0 ) then
				local Entity = TreeItem:GetText()
				local Groups = {}
				for _,v in pairs(SelectedLines) do
					local Group = v.Columns[1]:GetValue()
					if ( KKB.EntityRestrictions[Entity] == nil or not table.HasValue(KKB.EntityRestrictions[Entity].Groups, Group) ) then
						table.insert(Groups, Group)
					end
				end
				if ( #Groups > 0 ) then
					net.Start( "KKB_Entity_Add" )
					net.WriteTable( Groups )
					net.WriteString( Entity )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddPanel(AddGroupButton)
	
	Panel_Entitys.EntityTree = vgui.Create( "DTree" )
	Panel_Entitys.EntityTree:SetPadding( 5 )
	Panel_Entitys.EntityTree:SetTall( 400 )
	local EntityName = nil
	local Categorys = {}
	for k,v in pairs(scripted_ents.GetList()) do
		if ( v.t.Spawnable != nil and v.t.Spawnable == true ) then
			local Category = v.t.Category or "Other"
			if ( Categorys[Category] == nil ) then
				local Group = Panel_Entitys.EntityTree:AddNode( Category )
				Group.DoClick = function( Item )
					Item:SetSelected( false )
				end
				Categorys[Category] = Group
			end
			local Entity = Categorys[Category]:AddNode( v.t.ClassName )
			Entity.DoClick = function( Item )
				Panel_Entitys.AllowedGroupList:Clear()
				EntityName = Item:GetText()
				if ( KKB.EntityRestrictions[EntityName] != nil ) then
					Panel_Entitys.PhysgunCheck:SetValue(KKB.EntityRestrictions[EntityName].Options.Physgun)
					Panel_Entitys.ToolgunCheck:SetValue(KKB.EntityRestrictions[EntityName].Options.Toolgun)
					Panel_Entitys.GravcannonCheck:SetValue(KKB.EntityRestrictions[EntityName].Options.Gravcannon)
					Panel_Entitys.UseCheck:SetValue(KKB.EntityRestrictions[EntityName].Options.Use)
					Panel_Entitys.DamageCheck:SetValue(KKB.EntityRestrictions[EntityName].Options.Damage)
					Panel_Entitys.AllowedGroupList:Clear()
					for _,v in pairs(KKB.EntityRestrictions[EntityName].Groups) do
						Panel_Entitys.AllowedGroupList:AddLine(v)
					end
				end
			end
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.EntityTree)
	
	Panel_Entitys.AllowedGroupList = vgui.Create( "DListView" )
	Panel_Entitys.AllowedGroupList:AddColumn( "Allowed User Group" )
	Panel_Entitys.AllowedGroupList:SetTall( 150 )
	Panel_Entitys.AllowedGroupList:SetMultiSelect( true )
	function KKB.Entitys_Reload_AllowedGroups()
		Panel_Entitys.AllowedGroupList:Clear()
		if ( EntityName != nil ) then
			for _,v in pairs(KKB.EntityRestrictions[EntityName].Groups) do
				Panel_Entitys.AllowedGroupList:AddLine(v)
			end
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.AllowedGroupList)
	
	local RemoveGroupButton = vgui.Create( "DButton" )
	RemoveGroupButton:SetText( "Remove Group(s) From Selected Entity" )
	RemoveGroupButton.DoClick = function( button )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local SelectedLines = Panel_Entitys.AllowedGroupList:GetSelected()
			if ( #SelectedLines > 0 ) then
				local Entity = TreeItem:GetText()
				local Groups = {}
				for _,v in pairs(SelectedLines) do
					local Group = v.Columns[1]:GetValue()
					if ( KKB.EntityRestrictions[Entity] != nil and table.HasValue(KKB.EntityRestrictions[Entity].Groups, Group) ) then
						table.insert(Groups, Group)
					end
				end
				if ( #Groups > 0 ) then
					net.Start( "KKB_Entity_Delete" )
					net.WriteTable( Groups )
					net.WriteString( Entity )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddPanel(RemoveGroupButton)
	
	Panel_Entitys.BlacklistCheck = vgui.Create("DCheckBoxLabel")
	Panel_Entitys.BlacklistCheck:SetText("Blacklist?")
	Panel_Entitys.BlacklistCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Entitys.BlacklistCheck:SetValue(KKB.Settings.Entitys.Blacklist)
	Panel_Entitys.BlacklistCheck.OnChange = function( _, fVal )
		if ( KKB.Settings.Entitys.Blacklist != fVal ) then
			net.Start( "KKB_Settings_Update" )
			net.WriteString( "Entitys" )
			net.WriteString( "Blacklist" )
			net.WriteUInt( KKB.BoolToInt(fVal), 32 )
			net.SendToServer()
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.BlacklistCheck)
	Panel_Entitys:AddControl("Label", {Text = ""})
	
	Panel_Entitys.PhysgunCheck = vgui.Create("DCheckBoxLabel")
	Panel_Entitys.PhysgunCheck:SetText("Physgun")
	Panel_Entitys.PhysgunCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Entitys.PhysgunCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Entity = TreeItem:GetText()
			if ( KKB.EntityRestrictions[Entity] != nil ) then
				if ( KKB.EntityRestrictions[Entity].Options.Physgun != fVal ) then
					net.Start( "KKB_Entity_Update" )
					net.WriteString( Entity )
					net.WriteString( "Physgun" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddControl("Label", {Text = "Determines What Can Interact With This Entity"})
	Panel_Entitys:AddPanel(Panel_Entitys.PhysgunCheck)
	
	Panel_Entitys.ToolgunCheck = vgui.Create("DCheckBoxLabel")
	Panel_Entitys.ToolgunCheck:SetText("Toolgun")
	Panel_Entitys.ToolgunCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Entitys.ToolgunCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Entity = TreeItem:GetText()
			if ( KKB.EntityRestrictions[Entity] != nil ) then
				if ( KKB.EntityRestrictions[Entity].Options.Toolgun != fVal ) then
					net.Start( "KKB_Entity_Update" )
					net.WriteString( Entity )
					net.WriteString( "Toolgun" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.ToolgunCheck)
	
	Panel_Entitys.GravcannonCheck = vgui.Create("DCheckBoxLabel")
	Panel_Entitys.GravcannonCheck:SetText("Gravcannon")
	Panel_Entitys.GravcannonCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Entitys.GravcannonCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Entity = TreeItem:GetText()
			if ( KKB.EntityRestrictions[Entity] != nil ) then
				if ( KKB.EntityRestrictions[Entity].Options.Gravcannon != fVal ) then
					net.Start( "KKB_Entity_Update" )
					net.WriteString( Entity )
					net.WriteString( "Gravcannon" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.GravcannonCheck)
	
	Panel_Entitys.UseCheck = vgui.Create("DCheckBoxLabel")
	Panel_Entitys.UseCheck:SetText("Use")
	Panel_Entitys.UseCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Entitys.UseCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Entity = TreeItem:GetText()
			if ( KKB.EntityRestrictions[Entity] != nil ) then
				if ( KKB.EntityRestrictions[Entity].Options.Use != fVal ) then
					net.Start( "KKB_Entity_Update" )
					net.WriteString( Entity )
					net.WriteString( "Use" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.UseCheck)
	
	Panel_Entitys.DamageCheck = vgui.Create("DCheckBoxLabel")
	Panel_Entitys.DamageCheck:SetText("Damage")
	Panel_Entitys.DamageCheck:SetTextColor( Color(0, 0, 0, 255) )
	Panel_Entitys.DamageCheck.OnChange = function( _, fVal )
		local TreeItem = Panel_Entitys.EntityTree:GetSelectedItem()
		if ( TreeItem != nil ) then
			local Entity = TreeItem:GetText()
			if ( KKB.EntityRestrictions[Entity] != nil ) then
				if ( KKB.EntityRestrictions[Entity].Options.Damage != fVal ) then
					net.Start( "KKB_Entity_Update" )
					net.WriteString( Entity )
					net.WriteString( "Damage" )
					net.WriteUInt( KKB.BoolToInt(fVal), 32 )
					net.SendToServer()
				end
			end
		end
	end
	Panel_Entitys:AddPanel(Panel_Entitys.DamageCheck)
end